﻿@model SIFIET.Models.Question

@{
    ViewBag.Title = "Editar Pregunta del Tema " + @ViewBag.Topic.Description;
}

<div class="grid">
    <div class="c12">
        <h2>Editar Pregunta del Tema <strong> <i> @ViewBag.Topic.Description </i></strong></h2>
    </div>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="c12">
        <div class="c9 first" id="content">  

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        @Html.HiddenFor(model => model.Id)
        
        <div>
            @Html.HiddenFor(model => model.Type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sentence)
        </div>
        <div class="editor-field">
            <p>
            @Html.EditorFor(model => model.Sentence)
            <div class="alert error">
            @Html.ValidationMessageFor(model => model.Sentence)
            </div>
            </p>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.QuestionNumber)
        </div>
        <div class="editor-field">
            <p>
                @Html.EditorFor(model => model.QuestionNumber)
                <div class="alert error">
                @Html.ValidationMessageFor(model => model.QuestionNumber)
                </div>
            </p>
           <div class="alert error"><p>@TempData["Error2"]</p> </div>
        </div>

        <div class="editor-label">
            <p>
            @Html.LabelFor(model => model.IsObligatory)
            </p>
        </div>
        <div class="editor-field">
            <p>
            @Html.RadioButtonFor(model =>model.IsObligatory,0,true) No Obligatorio
                @Html.RadioButtonFor(model =>model.IsObligatory,1,false) Obligatoria
                <div class="alert error">
            @Html.ValidationMessageFor(model => model.IsObligatory)
            </div>
            </p>
        </div>

        <p>
            <input type="submit" value="Guardar" class="ebutton2 blue"/> &nbsp; @Html.ActionLink("Regresar al listado", "Index", routeValues: new { id = ViewBag.Topic.Id }, htmlAttributes: new { @class = "ebutton blue" })
        </p>
    </fieldset>
}
</div>
<div class="c3 last" id="layout">@Html.Partial("_LayoutSideBar")</div>
</div>
&nbsp;
</div>